package org.aeon.gamechatnest.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @author MissingAeon
 * @date 2024/5/22 9:33
 * @description
 */

@Data
@Schema(description = "聊天消息操作DTO")
public class ChatMessageMatchDto {

    /**
     * 消息id
     */
    @Schema(description = "消息id")
    @Pattern(regexp = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            message = "消息id格式不正确")
    private String messageId;

    /**
     * 目标id
     */
    @Schema(description = "目标id")
    @NotNull(message = "目标id不能为空")
    private Long targetId;

    /**
     * 返回条数
     */
    @Schema(description = "返回条数")
    @Min(value = 1, message = "返回条数不能小于1")
    @Max(value = 99, message = "返回条数不能大于99")
    private Integer limit;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private Long startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    private Long endTime;

}
